package cn.zlb.frame.application.api.mechant;

import cn.zlb.frame.api.user.dto.MerchantQryReqDTO;
import cn.zlb.frame.api.user.dto.MerchantQryRespDTO;
import cn.zlb.frame.api.user.facade.IMerchantFacade;
import cn.zlb.frame.application.repository.IMerchantRepository;
import cn.zlb.frame.common.result.Result;
import javax.annotation.Resource;
import org.apache.dubbo.common.constants.ClusterRules;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author yangjie.deng@resico.cn
 * @date 2023-11-14 15:56:38
 * @describe class responsibility
 */
@DubboService(interfaceClass = IMerchantFacade.class,
        version = "v1.0.0",
        cluster = ClusterRules.FAIL_OVER,
        loadbalance = "leastactive")
public class MerchantFacade implements IMerchantFacade {

    @Resource
    private IMerchantRepository merchantRepository;

    @Override
    public Result<MerchantQryRespDTO> merchantInfoByNo(MerchantQryReqDTO merchantQryReq) {
        // 查询
        return merchantRepository.getMerchantInfo(merchantQryReq.getTenantNo(), merchantQryReq.getMerchantNo());
    }
}
